.class public final Les/pa0;
.super Ljava/lang/Object;
.source "Mp4WebvttParser.java"

# interfaces
.implements Les/ba0;


# static fields
.field private static final c:I

.field private static final d:I

.field private static final e:I


# instance fields
.field private final a:Lcom/google/android/exoplayer/util/h;

.field private final b:Les/ra0$b;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const-string v0, "payl"

    .line 1
    invoke-static {v0}, Lcom/google/android/exoplayer/util/o;->a(Ljava/lang/String;)I

    move-result v0

    sput v0, Les/pa0;->c:I

    const-string v0, "sttg"

    .line 2
    invoke-static {v0}, Lcom/google/android/exoplayer/util/o;->a(Ljava/lang/String;)I

    move-result v0

    sput v0, Les/pa0;->d:I

    const-string v0, "vttc"

    .line 3
    invoke-static {v0}, Lcom/google/android/exoplayer/util/o;->a(Ljava/lang/String;)I

    move-result v0

    sput v0, Les/pa0;->e:I

    return-void
.end method

.method public constructor <init>()V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Lcom/google/android/exoplayer/util/h;

    invoke-direct {v0}, Lcom/google/android/exoplayer/util/h;-><init>()V

    iput-object v0, p0, Les/pa0;->a:Lcom/google/android/exoplayer/util/h;

    .line 3
    new-instance v0, Les/ra0$b;

    invoke-direct {v0}, Les/ra0$b;-><init>()V

    iput-object v0, p0, Les/pa0;->b:Les/ra0$b;

    return-void
.end method

.method private static a(Lcom/google/android/exoplayer/util/h;Les/ra0$b;I)Les/y90;
    .locals 5
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ParserException;
        }
    .end annotation

    .line 15
    invoke-virtual {p1}, Les/ra0$b;->b()V

    :cond_0
    :goto_0
    if-lez p2, :cond_3

    const/16 v0, 0x8

    if-lt p2, v0, :cond_2

    .line 16
    invoke-virtual {p0}, Lcom/google/android/exoplayer/util/h;->c()I

    move-result v1

    .line 17
    invoke-virtual {p0}, Lcom/google/android/exoplayer/util/h;->c()I

    move-result v2

    add-int/lit8 p2, p2, -0x8

    sub-int/2addr v1, v0

    .line 18
    new-instance v0, Ljava/lang/String;

    iget-object v3, p0, Lcom/google/android/exoplayer/util/h;->a:[B

    invoke-virtual {p0}, Lcom/google/android/exoplayer/util/h;->b()I

    move-result v4

    invoke-direct {v0, v3, v4, v1}, Ljava/lang/String;-><init>([BII)V

    .line 19
    invoke-virtual {p0, v1}, Lcom/google/android/exoplayer/util/h;->b(I)V

    sub-int/2addr p2, v1

    .line 20
    sget v1, Les/pa0;->d:I

    if-ne v2, v1, :cond_1

    .line 21
    invoke-static {v0, p1}, Les/sa0;->a(Ljava/lang/String;Les/ra0$b;)V

    goto :goto_0

    .line 22
    :cond_1
    sget v1, Les/pa0;->c:I

    if-ne v2, v1, :cond_0

    .line 23
    invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0, p1}, Les/sa0;->b(Ljava/lang/String;Les/ra0$b;)V

    goto :goto_0

    .line 24
    :cond_2
    new-instance p0, Lcom/google/android/exoplayer/ParserException;

    const-string p1, "Incomplete vtt cue box header found."

    invoke-direct {p0, p1}, Lcom/google/android/exoplayer/ParserException;-><init>(Ljava/lang/String;)V

    throw p0

    .line 25
    :cond_3
    invoke-virtual {p1}, Les/ra0$b;->a()Les/ra0;

    move-result-object p0

    return-object p0
.end method


# virtual methods
.method public bridge synthetic a([BII)Les/aa0;
    .locals 0
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ParserException;
        }
    .end annotation

    .line 1
    invoke-virtual {p0, p1, p2, p3}, Les/pa0;->a([BII)Les/qa0;

    move-result-object p1

    return-object p1
.end method

.method public a([BII)Les/qa0;
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ParserException;
        }
    .end annotation

    .line 3
    iget-object v0, p0, Les/pa0;->a:Lcom/google/android/exoplayer/util/h;

    add-int/2addr p3, p2

    invoke-virtual {v0, p1, p3}, Lcom/google/android/exoplayer/util/h;->a([BI)V

    .line 4
    iget-object p1, p0, Les/pa0;->a:Lcom/google/android/exoplayer/util/h;

    invoke-virtual {p1, p2}, Lcom/google/android/exoplayer/util/h;->a(I)V

    .line 5
    new-instance p1, Ljava/util/ArrayList;

    invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V

    .line 6
    :goto_0
    iget-object p2, p0, Les/pa0;->a:Lcom/google/android/exoplayer/util/h;

    invoke-virtual {p2}, Lcom/google/android/exoplayer/util/h;->a()I

    move-result p2

    if-lez p2, :cond_2

    .line 7
    iget-object p2, p0, Les/pa0;->a:Lcom/google/android/exoplayer/util/h;

    invoke-virtual {p2}, Lcom/google/android/exoplayer/util/h;->a()I

    move-result p2

    const/16 p3, 0x8

    if-lt p2, p3, :cond_1

    .line 8
    iget-object p2, p0, Les/pa0;->a:Lcom/google/android/exoplayer/util/h;

    invoke-virtual {p2}, Lcom/google/android/exoplayer/util/h;->c()I

    move-result p2

    .line 9
    iget-object p3, p0, Les/pa0;->a:Lcom/google/android/exoplayer/util/h;

    invoke-virtual {p3}, Lcom/google/android/exoplayer/util/h;->c()I

    move-result p3

    .line 10
    sget v0, Les/pa0;->e:I

    if-ne p3, v0, :cond_0

    .line 11
    iget-object p3, p0, Les/pa0;->a:Lcom/google/android/exoplayer/util/h;

    iget-object v0, p0, Les/pa0;->b:Les/ra0$b;

    add-int/lit8 p2, p2, -0x8

    invoke-static {p3, v0, p2}, Les/pa0;->a(Lcom/google/android/exoplayer/util/h;Les/ra0$b;I)Les/y90;

    move-result-object p2

    invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 12
    :cond_0
    iget-object p3, p0, Les/pa0;->a:Lcom/google/android/exoplayer/util/h;

    add-int/lit8 p2, p2, -0x8

    invoke-virtual {p3, p2}, Lcom/google/android/exoplayer/util/h;->b(I)V

    goto :goto_0

    .line 13
    :cond_1
    new-instance p1, Lcom/google/android/exoplayer/ParserException;

    const-string p2, "Incomplete Mp4Webvtt Top Level box header found."

    invoke-direct {p1, p2}, Lcom/google/android/exoplayer/ParserException;-><init>(Ljava/lang/String;)V

    throw p1

    .line 14
    :cond_2
    new-instance p2, Les/qa0;

    invoke-direct {p2, p1}, Les/qa0;-><init>(Ljava/util/List;)V

    return-object p2
.end method

.method public a(Ljava/lang/String;)Z
    .locals 1

    const-string v0, "application/x-mp4vtt"

    .line 2
    invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    return p1
.end method
